package com.example.yunifang.fragment;

import java.util.ArrayList;

import com.example.yunifang.R;
import com.example.yunifang.XiangQingActivity;
import com.example.yunifang.adapter.PinLunAdapter;
import com.example.yunifang.bean.XiangQingBean.Data.Comments;
import com.example.yunifang.myview.MyListView;

import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

public class PinLunFragment extends Fragment {

	private MyListView pinlun_lv;

	@Override
	public View onCreateView(LayoutInflater inflater, ViewGroup container,
			Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		View view=View.inflate(getActivity(), R.layout.pinlunfragment, null);
		pinlun_lv=(MyListView) view.findViewById(R.id.pinlun_lv);
		ArrayList<Comments> data=XiangQingActivity.comments;
		PinLunAdapter adapter=new PinLunAdapter(data, getActivity());
		pinlun_lv.setAdapter(adapter);
		return view;
	}
}
